package com.shop.shop.service.impl;

import java.util.List;

import com.shop.shop.dao.ShopUserCarMapper;
import com.shop.shop.domain.ShopUserCar;
import com.shop.shop.service.IShopUserCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户，购物车关联Service业务层处理
 * 
 * @author
 */
@Service
public class ShopUserCarServiceImpl implements IShopUserCarService
{
    @Autowired
    private ShopUserCarMapper shopUserCarMapper;

    /**
     * 查询用户，购物车关联
     * 
     * @param userId 用户，购物车关联主键
     * @return 用户，购物车关联
     */
    @Override
    public ShopUserCar selectShopUserCarByUserId(Long userId)
    {
        return shopUserCarMapper.selectShopUserCarByUserId(userId);
    }

    /**
     * 查询用户，购物车关联列表
     * 
     * @param shopUserCar 用户，购物车关联
     * @return 用户，购物车关联
     */
    @Override
    public List<ShopUserCar> selectShopUserCarList(ShopUserCar shopUserCar)
    {
        return shopUserCarMapper.selectShopUserCarList(shopUserCar);
    }

    /**
     * 新增用户，购物车关联
     * 
     * @param shopUserCar 用户，购物车关联
     * @return 结果
     */
    @Override
    public int insertShopUserCar(ShopUserCar shopUserCar)
    {
        return shopUserCarMapper.insertShopUserCar(shopUserCar);
    }

    /**
     * 修改用户，购物车关联
     * 
     * @param shopUserCar 用户，购物车关联
     * @return 结果
     */
    @Override
    public int updateShopUserCar(ShopUserCar shopUserCar)
    {
        return shopUserCarMapper.updateShopUserCar(shopUserCar);
    }

    /**
     * 批量删除用户，购物车关联
     * 
     * @param userIds 需要删除的用户，购物车关联主键
     * @return 结果
     */
    @Override
    public int deleteShopUserCarByUserIds(Long[] userIds)
    {
        return shopUserCarMapper.deleteShopUserCarByUserIds(userIds);
    }

    /**
     * 删除用户，购物车关联信息
     * 
     * @param userId 用户，购物车关联主键
     * @return 结果
     */
    @Override
    public int deleteShopUserCarByUserId(Long userId)
    {
        return shopUserCarMapper.deleteShopUserCarByUserId(userId);
    }
}
